JBoss Community Archive (Read Only)

WildFly Camel

Resolver API

Resolver

A Resolver can find a consistent wiring solution for set of Resources in the given ResolveContext.

A ResolveContext contains a set mandatory and optional Resources. It is also the provider all possible Capability candidates (i.e. already resolved Resources in a runtime environment).

Resource resolution is deterministic and leads to the same result for a given set of Resources. The Resolver is thread safe and state less.

Resolution Preference

When multiple Capability candidates can be found for a given Requirement, the Resolver must make a preference selection. This is abstracted by the PreferencePolicy

The default implementation prefers

  1. already resolved resources over unresolved resources

  2. higher capability versions

Resolution Failure

In case the mandatory set of resources from the ResolveContext cannot be resolved, the Resolver will throw a ResolutionException with the set of unresolved Requirements.

Applying Resolver Results

An attempt to resolve a given set of Resources will not change the state of any Resource. However, when the Resolver is called like this

        ResolveContext context = getResolveContext(Arrays.asList(resA, resB), null);
        Map<Resource, List<Wire>> wiremap = resolver.resolveAndApply(context);

we can get the updated Wiring for every Resource.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:58:35 UTC, last content change 2013-08-01 12:11:16 UTC.